/**
 * @file       Point.cpp
 * @brief      TODO
 * @author     Huabo Zheng
 * @date       Jan 12, 2012
 * @Copyright  2012, www.netgear.com Inc. All rights reserved.
 */

#include "Point.h"

namespace NS_LCD_AFW
{

CPoint::CPoint() :
		m_nX(0), m_nY(0)
{
}

CPoint::CPoint(int x, int y) :
		m_nX(x), m_nY(y)
{
}

CPoint::~CPoint()
{
}

int CPoint::getX() const
{
	return m_nX;
}

int CPoint::getY() const
{
	return m_nY;
}

void CPoint::setX(int x)
{
	m_nX = x;
}

void CPoint::setY(int y)
{
	m_nY = y;
}

bool CPoint::operator ==(const CPoint & other) const
{
	return (other.m_nX == this->m_nX && other.m_nY == this->m_nY);
}

bool CPoint::operator !=(const CPoint & other) const
{
	return (other.m_nX != this->m_nX || other.m_nY != this->m_nY);
}

CPoint & CPoint::operator +(const CPoint & other)
{
	this->m_nX += other.m_nX;
	this->m_nY += other.m_nY;
	return *this;
}

} /* namespace NS_LCD_AFW */
